package com.ambition.demo.utils;


import com.ambition.demo.design.proxy.JdkDynamicProxy;

import java.lang.reflect.Proxy;

public class ProxyUtil {
        public static Object newProxyInstance(Object target) {
            return Proxy.newProxyInstance(target.getClass().getClassLoader(),
                    target.getClass().getInterfaces(),
                    new JdkDynamicProxy(target));
        }
}
